from . import views
from django.urls import re_path

urlpatterns = [

    # 注册
    re_path(r'^api/v1.0/users$', views.RegisterView.as_view()),

    # 登录&判断是否登入&退出登入
    re_path(r'^api/v1.0/session$', views.LoginView.as_view()),

    # 个人中心的子路由
    re_path(r'^api/v1.0/user$', views.UserInfoView.as_view()),


    # 修改用户名
    re_path(r'^api/v1.0/user/name$', views.UserNameView.as_view()),


    # 上传个人头像
    re_path(r'^api/v1.0/user/avatar$', views.UserAvatar.as_view()),

    # 我的房源
    re_path(r'^api/v1.0/user/houses$', views.MyHouseView.as_view()),

    # 房屋详情页
    re_path(r'^api/v1.0/houses/(?P<house_id>\d+)$', views.HomeDetailView.as_view()),
]
